hoe to solve for comparative advantage